using System.IO;

namespace Sedge.Core.FileSystemWrap
{
    class DirectoryWrap : IDirectoryWrap
    {
        public IDirectoryInfoWrap CreateDirectory(string path)
        {
            return new DirectoryInfoWrap(Directory.CreateDirectory(path));
        }

        public void Delete(string path)
        {
            Directory.Delete(path);
        }

        public bool Exists(string path)
        {
            return Directory.Exists(path);
        }

        public IDirectoryInfoWrap GetDirectoryInfo(string path)
        {
            return new DirectoryInfoWrap(new DirectoryInfo(path));
        }

        public string[] GetDirectories(string path)
        {
            return Directory.GetDirectories(path);
        }

        public string[] GetFiles(string path)
        {
            return Directory.GetFiles(path);
        }

		  public string[] GetFiles(string path, string searchPattern)
		  {
			  return Directory.GetFiles(path, searchPattern);
		  }
		  
		 public string[] GetFiles(string path, string searchPattern, SearchOption searchOption)
        {
            return Directory.GetFiles(path, searchPattern, searchOption);
        }

        public IDirectoryInfoWrap GetParent(string path)
        {
            return new DirectoryInfoWrap(Directory.GetParent(path));
        }
    }
}